package org.jeecg.modules.paycenter.channel.zxbank.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import java.util.ArrayList;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@XmlAccessorType(XmlAccessType.FIELD)
public class UserDataList {

//    @XmlAttribute(name = "userDataList")
    @XmlAttribute
    private String name;

    @XmlElement
    private List<BaseUserData> row;

    public void addData(BaseUserData data){
        row.add(data);
    }

    public UserDataList(){
        this.name = "userDataList";
        row = new ArrayList<>();
    }
}
